{% extends "registration/registration_base.html" %}
{% load i18n %}
{% block head %}
  <link href="{{ STATIC_URL }}css/cover.css" rel="stylesheet">
  <style type="text/css">
    html.body: {
      height: 100%;
    }
  </style>
{% endblock head %}

{% block title %}宁强在线登录{% endblock %}
{% block body %}

<div class="container-fluid">
<div class="row">
<div class="col-lg-4 col-lg-offset-4 col-md-4 col-md-offset-4 col-sm-12 col-xs-12">
<div class="cover">
  {% if form.non_field_errors %}
    {% for error in form.non_field_errors %}
      <div class="alert alert-danger alert-dismissable">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
        {{ error }}
      </div>
    {% endfor %}
  {% endif %}
  <div class="login">

<form class="form-unit" method="post" action="{% url "auth_login"%}" role="form">
{% csrf_token %}
        <div class="form-group{% if form.username.errors %} has-error{% endif %}">
          <input type="text" class="form-control" id="username" name="username" placeholder="请输入用户名">
          {% for error in form.username.errors %}
            <label class="control-label">{{ error }}</label>
          {% endfor %}
        </div>
        <div class="form-group{% if form.password.errors %} has-error{% endif %}">
          <input type="password" class="form-control" id="password" name="password" placeholder="请输入密码">
          {% for error in form.password.errors %}
            <label class="control-label">{{ error }}</label>
          {% endfor %}
        </div>
        <button type="submit" class="btn btn-primary btn-post anim-blue-all">{% trans 'Log in' %}</button>
        <div class="horizontal-line"></div>
        <a class="btn btn-success" href="{% url 'registration_register' %}">
          没有帐号？免费注册一个
        </a>
        <a class="btn btn-warning" href="{% url 'auth_password_reset' %}">
          忘记密码？点这里找回
        </a>
        <input type="hidden" name="next" value="{{ next }}" />
</form>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
